package com.iwop.moto.service;

import com.iwop.moto.cache.CacheBaseService;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * Service基础类，所以Service必须继承此类
 * @author huyuangui
 * @time 2016-07-06
 */
public class BaseService {
    protected static String selectByPrimaryKey="selectByPrimaryKey";
    protected static String insert="insert";
    protected static String updateByPrimaryKey="updateByPrimaryKey";
    protected static String deleteByPrimaryKey="deleteByPrimaryKey";
    protected static String countAll="countAll";
    protected static String getLast="getLast";

    @Autowired
    private CacheBaseService cacheBaseService;
    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;
    public SqlSession session;
    public void setCacheBaseService(CacheBaseService cacheBaseService) {
        this.cacheBaseService = cacheBaseService;
    }

    public CacheBaseService getCacheBaseService() {
        return cacheBaseService;
    }
    public SqlSessionTemplate getSqlSession(){
        return sqlSessionTemplate;
    }
}
